#include "Coin.h"
#include "Resource/ResourceManager.h"

CCoin::CCoin()
{
	mObjectClassification = ObjectClassification_Coin;
	this->autorelease();
}
CCoin::~CCoin()
{

}
void CCoin::Load(CCDictionary* coinDic)
{
	CCPoint pos = CCPointFromString(coinDic->valueForKey("pos")->getCString());
	CCSize winSize = CCDirector::sharedDirector()->getWinSize();

	CCSprite* coin = CCSprite::create(ResourceManager->GetTexture(Coin));
	coin->setPosition(CCPoint(pos.x*winSize.width,pos.y*winSize.height));
	this->addChild(coin, this->getZOrder() + 1, kCoinTag);
}